function plot_scatter3(numbins,numScaledBins,params,data)
binReduction=numbins/numScaledBins;
%dens = zeros(numScaledBins,numScaledBins,numScaledBins);

randIndices=randperm(length(data(:,1)));
r=randIndices(1:numScaledBins);

% for i=1:length(data(:,1))
%         x = max(fix(data(i,1)/binReduction),1);
%         y = max(fix(data(i,2)/binReduction),1);
%         z = max(fix(data(i,3)/binReduction),1);
%         dens(y,x,z) = dens(y,x,z) + 1;
% end
    %fsc_axis = 0:1:(numScaledBins-1)*binReduction;
    %fl1_axis = 0:1:(numScaledBins-1)*binReduction;
    %gca=imagesc(fsc_axis, fl1_axis, log(dens+1), [0 4]);
    figure
 %   scatter3(dens(:,1),dens(:,2),dens(:,3));
 
 scatter3(data(r,1),data(r,2),data(r,3))